<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>嵌套if选择结构</title>
</head>

<body>
    <script>
        var score3 = parseInt(prompt('请输入百米成绩：'))
        if (score3 < 12) {
            console.log('进入决赛');
            var gender = prompt('请输入性别：')
            // 嵌套if选择结构，就是满足一个if后，继续满足里面的if
            if (gender === '男') {
                console.log('进入男子组');
            } else {
                console.log('进入女子组');
            }

        } else {
            console.log('直接淘汰');
        }
    </script>
</body>

</html>